package ruifeng.zcj.dig.ui.shopping;

import android.app.Activity;
import android.content.Intent;
import android.support.v4.app.Fragment;

import java.util.ArrayList;

import ruifeng.zcj.dig.base.DepositFragmentActivity;
import ruifeng.zcj.dig.base.FragmentInfo;
import ruifeng.zcj.dig.groble.FragmentArgs;

/**
 * 商城所有的fragment
 * Created by Administrator on 2016/9/29 0029.
 */
public class ShoppingActivity extends DepositFragmentActivity {
    public static void launch(Activity activity,
                              Class<? extends Fragment> clazz,
                              FragmentArgs args) {
        Intent intent = new Intent(activity, ShoppingActivity.class);
        intent.putExtra(KEY_CLASS_NAME, clazz.getName());
        if (args != null) {
            intent.putExtra(KEY_ARGS, args);
        }
        activity.startActivity(intent);
    }
    @Override
    protected void addPage(ArrayList<String> tabTitles, ArrayList<FragmentInfo> fragmentInfos) {
        tabTitles.add("测试下哈");
        fragmentInfos.add(new FragmentInfo(TwoCategoryFragment.class, getBundle("categoryBundle")));


        tabTitles.add("测试下哈");
        fragmentInfos.add(new FragmentInfo(ThreeCategoryFragment.class, getBundle(0)));

      /*  tabTitles.add("测试下哈");
        fragmentInfos.add(new FragmentInfo(RepairFragment.class, getBundle(1)));*/

    }

    public void setScreenPageLimit() {
        mViewPager.setOffscreenPageLimit(mBaseFragmentViewPageAdapter.getCount());
    }
}
